<?php
class Category extends AppModel {
	public $name = 'Category';

	public $hasMany = 'GroupCategory';

	public $validate = array(
		'name' => array(
			'custom' => array(
				'rule' => 'notEmpty',
				'message' => 'Please enter a category name'
			),
			'custom2' => array(
				'rule' => 'isUnique',
				'message' => 'This category already exists'
			)
		)
	);
}